let mixin = {
	data(){
		return{
			user:{},
			animateData:{},
			animateData1:{},
			animateData2:{},
			animateData3:{}
		}
	},
	mounted(){
		this.user = uni.getStorageSync("usernameInfo")?uni.getStorageSync("usernameInfo"):{}
	},
	computed: {
		animation() {
			return uni.createAnimation({
				duration: 300,
				timingFunction: "ease-in-out"
			})
		},
		animation1() {
			return uni.createAnimation({
				duration: 300,
				timingFunction: "linear"
			})
		}
	},
	methods: {
		Left() {
			this.animation1.translateX(0).step()
			this.animateData3 = this.animation1.export()
		},
		Right(){
			this.animation1.translateX(900).step()
			this.animateData3 = this.animation1.export()
		},
		fadeInScale() {
			this.animation.scale(1).opacity(1).step()
			this.animateData = this.animation.export()
		},
		fadeOutScale() {
			this.animation.scale(0).opacity(0).step()
			this.animateData = this.animation.export()
		},
		fadeIn(){
			this.animation.opacity(1).step()
			this.animateData = this.animation.export()
		},
		fadeInTranslateY(){
			this.animation.translateY(0).opacity(1).step()
			this.animateData1 = this.animation.export()
		},
		fadeOutTranslateYless(){
			this.animation.translateY(200).opacity(1).step()
			this.animateData1 = this.animation.export()
		},
		fadeOut(){
			this.animation.opacity(0).step()
			this.animateData = this.animation.export()
		},
		fadeInProd(){
			this.animation.opacity(1).step()
			this.animateData2 = this.animation.export()
		},
		fadeOutProd(){
			this.animation.opacity(0).step()
			this.animateData2 = this.animation.export()
		}
	}
}
export default {
	mixin
}
